﻿
firstColumns = [
  { index: 5, headerText: "M+1", edit: true, width: 80, rowText: "M_1" },
  { index: 6, headerText: "M+2", edit: true, width: 80, rowText: "M_2" },
  { index: 7, headerText: "M+3", edit: true, width: 80, rowText: "M_3" }
];


var readyJSON = [
            { "description": "Head Products", "headrow": true },
            {
                "accountcode": "SI04010000", "description": "Total Head product sales", datarow: true, skip: [ ],
                Process: [{
                    Field: "Qty",
                    Exp: {
                        //                        mode: "search",
                        //                        fields: ["Refrence&Forecast_PSBR&SV04010100&_Qty"],row: 0, 
                        //                        equ: "-"
                        mode: "refrence", list: "Forecast_PSBR", fields: ["SV04010100"], equ: "+", postf: "Qty"
                    }
                }, {
                    Field: "BA",
                    Exp: {
                        //                        mode: "search",
                        //                        fields: ["Refrence&Forecast_PSBR&SV04010100&_T"],row: 1,
                        //                        equ: "-" 
                        mode: "refrence", list: "Forecast_PSBR", fields: ["SV04010100"], equ: "+", postf: "T"
                    }
                }]
            },
            { "accountcode": "SI04010100", "description": "External Sales", datarow: true, skip: [ ] },
        {
            "accountcode": "SI04010200", "description": "Internal Sales", datarow: true, skip: [ ],
            Process: [{
                Field: "Qty",
                Exp: {
                    mode: "search",
                    fields: ["SI04010201", "SI04010202"],
                    equ: "+"
                }
            }, {
                Field: "BA",
                Exp: {
                    mode: "search",
                    fields: ["SI04010201", "SI04010202"],
                    equ: "+"
                }
            }]
        },
            { "accountcode": "SI04010201", "description": "Internal Sales-Asia", "subrow": [], rgc: true, skip: [ ] },
            { "accountcode": "SI04010202", "description": "Internal Sales-Non Asia", datarow: true, skip: [ ] },

            { accountcode: "Control", description: "SI04010000=SI04010100+SI04010200", controlrow: true, skip: [ ], Process: [{
                Field: "Qty",
                Exp: {
                    mode: "search",
                    fields: ["SI04010000", "SI04010100", "SI04010200"],
                    equ: ["-(", "+", ")-"]
                }
            }, {
                Field: "BA",
                Exp: {
                    mode: "search",
                    fields: ["SI04010000", "SI04010100", "SI04010200"],
                    equ: ["-(", "+", ")-"]
                }
            }]
            },
            { "emptyrow": true },


            { "description": "Service Sales", "headrow": true },
            {
                "accountcode": "SI04030000", "description": "Total Service Sales", datarow: true, skip: ['Qty',  ], subskip: ['Qty'],
                Process: [{
                    Field: "BA",
                    Exp: {
                        mode: "refrence", list: "Forecast_SCS", row: 1, fields: ["SV04030100"], equ: "+"
                    }
                }]
            },
            { "accountcode": "SI04030100", "description": "Service Sales-External", datarow: true, skip: ['Qty',  ] },
        {
            "accountcode": "SI04030200", "description": "Service Sales-Internal", datarow: true, skip: ['Qty',  ], subskip: ['Qty'],
            Process: [{
                Field: "Qty",
                Exp: {
                    mode: "search",
                    fields: ["SI04030201", "SI04030202"],
                    equ: "+"
                }
            }, {
                Field: "BA",
                Exp: {
                    mode: "search",
                    fields: ["SI04030201", "SI04030202"],
                    equ: "+"
                }
            }]
        },
            { "accountcode": "SI04030201", "description": "Service Sales-Internal-Asia", "subrow": [], rgc: false, skip: ['Qty',  ], subskip: ['Qty'] },
            { "accountcode": "SI04030202", "description": "Service Sales-Internal-Non Asia", datarow: true, skip: ['Qty',  ] },
               { accountcode: "Control", description: "SI04030000=SI04030100+SI04030200", controlrow: true, skip: ['Qty',  ], Process: [
               {
                   Field: "BA",
                   Exp: {
                       mode: "search",
                       fields: ["SI04030000", "SI04030100", "SI04030200"],
                       equ: ["-(", "+", ")-"]
                   }
               }]
               },
            { "emptyrow": true },

            { "description": "Commission Sales", "headrow": true },
            {
                "accountcode": "SI04040000", "description": "Total Commission Sales", datarow: true, skip: ['Qty',  ], subskip: ['Qty'],
                Process: [{
                    Field: "BA",
                    Exp: {
                        mode: "refrence", list: "Forecast_SCS", row: 1, fields: ["SV04040100"], equ: "+"
                    }
                }]
            },
            { "accountcode": "SI04040101", "description": "Commission Sales-Asia", "subrow": [], rgc: false, skip: ['Qty',  ], subskip: ['Qty'] },
            { "accountcode": "SI04040102", "description": "Commission Sales-Non Asia", datarow: true, skip: ['Qty',  ] },
            { "accountcode": "Control", description: "SI04040000=SI04040101+SI04040102", controlrow: true, skip: ['Qty',  ], Process: [{
                Field: "BA",
                Exp: {
                    mode: "search",
                    fields: ["SI04040000", "SI04040101", "SI04040102"],
                    equ: ["-(", "+", ")-"]
                }
            }]
            },
            { "emptyrow": true }
             
        ];
